<div class="panel panel-warning" >
    <div class="panel-heading text-center">
        &nbsp;
        <button class="btn btn-primary pull-right" ng-if="$root.hasPower('style',curInstance.id)"
                ng-click="addDict(type)">添加
        </button>
      <!--  <button class="btn btn-info pull-right" ng-click="addPhotos(pageModel,{'typeId':curType.id,'multiple':true })">
            复制此样式
        </button>-->
    </div>
    <div class="panel-body" style="padding:0">
        <table class="table table-bordered table-striped table-hover" style="margin-bottom: 0" ng-if="['point','line','polygon','building','arrow','roadSign'].indexOf(type.id)>-1">
            <thead class="title">
            <tr>
                <th class="text-center">NO</th>
                <th th-check items="type.data" class="text-center" style="width:20px"></th>
                <th>名称</th>
                <th>颜色</th>
                <th>透明度</th>
                <th style="width:120px">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="!type.data || type.data.length == 0">
                <td colspan="100" class="text-center">暂无记录</td>
            </tr>
            <tr ng-repeat-start="item in type.data" ng-show="!item.edit">
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>{{item.name}}</td>
                <td>
                    <i ng-show="item.color" class="color-block" ng-style="{'background-color':(item.color)}"></i>
                    {{item.color}}</td>
                <td>{{item.transparent}}</td>
                <td>
                    <span role="button" ng-click="dictReference(type,item)" class='btn btn-xs btn-link'><span class='fa fa-binoculars'></span>查看</span>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='editDict(item)' class='btn btn-xs btn-link'><span
                            class='fa fa-edit'></span>编辑</a>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='delDict(type,item,"dict_color")' class='btn btn-xs btn-link'><span
                            class='fa fa-trash'></span>删除</a>
                </td>
            </tr>
            <tr ng-repeat-end ng-show="item.edit" ng-form name="form" novalidate>
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.name" name="name" required
                           uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.id}}" ensure-unique="dictName"  />
                   </td>
                <td>
                    <span color-edit host="item.copy" key="'color'" need=true></span>
                </td>
                <td> <input type="text" class="form-control" ng-model="item.copy.transparent" name="transparent" ng-pattern="/^[0123456789abcdef]{2}$/i" required></td>
                <td>
                    <a href='javascript:void(0)' ng-click="saveDict(form,item,'/dict/saveColor')" class='btn btn-xs btn-link text-primary'><span class='fa fa-save'></span>保存</a>
                    <a href='javascript:void(0)' ng-click="cancelDict(type,item)" class='btn btn-xs btn-link text-danger'><span class='fa fa-undo'></span>取消</a>
                </td>
            </tr>
            </tbody>
        </table>

        <table class="table table-bordered table-striped table-hover" style="margin-bottom: 0" ng-if="type.id=='font'">
            <thead class="title">
            <tr>
                <th class="text-center">NO</th>
                <th th-check items="type.data" class="text-center" style="width:20px"></th>
                <th>名称</th>
                <th>值</th>
                <th style="width:120px">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="!type.data || type.data.length == 0">
                <td colspan="100" class="text-center">暂无记录</td>
            </tr>
            <tr ng-repeat-start="item in type.data" ng-show="!item.edit">
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>{{item.name}}</td>
                <td>{{item.val}}</td>
                <td>
                    <span role="button" ng-click="dictReference(type,item)" class='btn btn-xs btn-link'><span class='fa fa-binoculars'></span>查看</span>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='editDict(item)' class='btn btn-xs btn-link'><span
                            class='fa fa-edit'></span>编辑</a>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='delDict(type,item,"dict_font")' class='btn btn-xs btn-link'><span
                            class='fa fa-trash'></span>删除</a>
                </td>
            </tr>
            <tr ng-repeat-end ng-show="item.edit" ng-form name="form" novalidate>
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.name" name="name" required
                           uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.id}}" ensure-unique="dictName"  />
                </td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.val" name="val" required>
                </td>
                <td>
                    <a href='javascript:void(0)' ng-click="saveDict(form,item,'/dict/saveFont')" class='btn btn-xs btn-link text-primary'><span class='fa fa-save'></span>保存</a>
                    <a href='javascript:void(0)' ng-click="cancelDict(type,item)" class='btn btn-xs btn-link text-danger'><span class='fa fa-undo'></span>取消</a>
                </td>
            </tr>
            </tbody>
        </table>

        <table class="table table-bordered table-striped table-hover" style="margin-bottom: 0" ng-if="type.id=='fontSize'">
            <thead class="title">
            <tr>
                <th class="text-center">NO</th>
                <th th-check items="type.data" class="text-center" style="width:20px"></th>
                <th>名称</th>
                <th>字体大小</th>
                <th style="width:120px">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="!type.data || type.data.length == 0">
                <td colspan="100" class="text-center">暂无记录</td>
            </tr>
            <tr ng-repeat-start="item in type.data" ng-show="!item.edit">
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>{{item.name}}</td>
                <td>{{item.val}}</td>
                <td>
                    <span role="button" ng-click="dictReference(type,item)" class='btn btn-xs btn-link'><span class='fa fa-binoculars'></span>查看</span>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='editDict(item)' class='btn btn-xs btn-link'><span
                            class='fa fa-edit'></span>编辑</a>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='delDict(type,item,"dict_font_size")' class='btn btn-xs btn-link'><span
                            class='fa fa-trash'></span>删除</a>
                </td>
            </tr>
            <tr ng-repeat-end ng-show="item.edit" ng-form name="form" novalidate>
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.name" name="name" required
                           uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.id}}" ensure-unique="dictName"  />
                </td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.val" name="val" required>
                </td>
                <td>
                    <a href='javascript:void(0)' ng-click="saveDict(form,item,'/dict/saveFontSize')" class='btn btn-xs btn-link text-primary'><span class='fa fa-save'></span>保存</a>
                    <a href='javascript:void(0)' ng-click="cancelDict(type,item)" class='btn btn-xs btn-link text-danger'><span class='fa fa-undo'></span>取消</a>
                </td>
            </tr>
            </tbody>
        </table>

        <table class="table table-bordered table-striped table-hover" style="margin-bottom: 0"   ng-if="type.id=='dashLine'" >
            <thead class="title">
            <tr>
                <th class="text-center">NO</th>
                <th th-check items="style.data" class="text-center" style="width:20px"></th>
                <th><span uib-tooltip="dash-line-name">名称</span></th>
                <th><span uib-tooltip="from">从</span></th>
                <th><span uib-tooltip="to">到</span></th>
                <th><span uib-tooltip="side-dashline-array">线填充{实、虚}数组</span></th>
                <th><span uib-tooltip="stroke-dashline-array">线描边{实、虚}数组</span></th>
                <th><span uib-tooltip="x-roate">x-roate</span></th>
                <th><span uib-tooltip="x-antialising">抗锯齿</span></th>
                <th style="width:120px">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-if="!type.data || type.data.length == 0">
                <td colspan="100" class="text-center">暂无记录</td>
            </tr>
            <tr ng-repeat-start="item in type.data" ng-show="!item.edit">
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>{{item.name}}</td>

                <td>{{item.begin}}</td>
                <td>{{item.end}}</td>
                <td>{{item.sideDashlineArray}}</td>
                <td>{{item.strokeDashlineArray}}</td>
                <td>{{item.xRoate}}</td>
                <td>{{item.xAntialising}}</td>
                <td>
                    <span role="button" ng-click="dictReference(type,item)" class='btn btn-xs btn-link'><span class='fa fa-binoculars'></span>查看</span>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='editDict(item)' class='btn btn-xs btn-link'><span
                            class='fa fa-edit'></span>编辑</a>
                    <a ng-if="$root.hasPower('style',curInstance.id)" href='javascript:void(0)' ng-click='delDict(type,item,"dict_dash_line")' class='btn btn-xs btn-link'><span
                            class='fa fa-trash'></span>删除</a>
                </td>
            </tr>
            <tr ng-repeat-end ng-show="item.edit" ng-form name="form" novalidate>
                <td class="text-center">{{$index + 1}}</td>
                <td td-check item="item"></td>
                <td>
                    <input type="text" class="form-control" ng-model="item.copy.name" name="name" required
                           uib-tooltip="{{item.name && form.name.$invalid?'有重名':null}}"  id="{{item.id}}" ensure-unique="dictName"  />
                </td>
                <td><input type="number" class="form-control" ng-model="item.copy.begin" ng-pattern="/^(?:[0-9]|1[0-9]|20)$/" required> </td>
                <td><input type="number" class="form-control" ng-model="item.copy.end" ng-pattern="/^(?:[0-9]|1[0-9]|20)$/" required> </td>
                <td><input type="text" class="form-control" ng-model="item.copy.sideDashlineArray"  > </td>
                <td><input type="text" class="form-control" ng-model="item.copy.strokeDashlineArray" required > </td>
                <td><input type="number" class="form-control" ng-model="item.copy.xRoate"  required> </td>
                <td><input type="text" class="form-control" ng-model="item.copy.xAntialising"  required> </td>
                <td>
                    <a href='javascript:void(0)' ng-click="saveDict(form,item,'/dict/saveDashLine')" class='btn btn-xs btn-link text-primary'><span class='fa fa-save'></span>保存</a>
                    <a href='javascript:void(0)' ng-click="cancelDict(type,item)" class='btn btn-xs btn-link text-danger'><span class='fa fa-undo'></span>取消</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>



<!--<div class="panel panel-warning" >
    <div class="panel-heading text-center">
        &nbsp;
        <button class="btn btn-primary pull-right" ng-click="showFontModal({},type)">添加
        </button>
        <button class="btn btn-info pull-right" ng-click="addPhotos(pageModel,{'typeId':curType.id,'multiple':true })">
            复制此样式
        </button>
    </div>
    <div class="panel-body" style="padding:0">


    </div>
</div>
<div class="panel panel-warning" ng-if="type.id=='dashLine'">
    <div class="panel-heading text-center">
        &nbsp;
        <button class="btn btn-primary pull-right" ng-click="showDashLineModal({},type)">添加
        </button>
        <button class="btn btn-info pull-right" ng-click="addPhotos(pageModel,{'typeId':curType.id,'multiple':true })">
            复制此样式
        </button>
    </div>
    <div class="panel-body" style="padding:0">



    </div>
</div>-->


